Optimal. Leaf size=59 \[ \frac {e^2 x}{c}+\frac {\left (c d^2-a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {d e \log \left (a+c x^2\right )}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {716, 649, 211,
266} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (c d^2-a e^2\right )}{\sqrt {a} c^{3/2}}+\frac {d e \log \left (a+c x^2\right )}{c}+\frac {e^2 x}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 716
Rubi steps
\begin {align*} \int \frac {(d+e x)^2}{a+c x^2} \, dx &=\int \left (\frac {e^2}{c}+\frac {c d^2-a e^2+2 c d e x}{c \left (a+c x^2\right )}\right ) \, dx\\ &=\frac {e^2 x}{c}+\frac {\int \frac {c d^2-a e^2+2 c d e x}{a+c x^2} \, dx}{c}\\ &=\frac {e^2 x}{c}+(2 d e) \int \frac {x}{a+c x^2} \, dx+\frac {\left (c d^2-a e^2\right ) \int \frac {1}{a+c x^2} \, dx}{c}\\ &=\frac {e^2 x}{c}+\frac {\left (c d^2-a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {d e \log \left (a+c x^2\right )}{c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 56, normalized size = 0.95 \begin {gather*} \frac {\left (c d^2-a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {e \left (e x+d \log \left (a+c x^2\right )\right )}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.45, size = 53, normalized size = 0.90
method | result | size |
default | \(\frac {e^{2} x}{c}+\frac {d e \ln \left (c \,x^{2}+a \right )+\frac {\left (-e^{2} a +c \,d^{2}\right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{c}\) | \(53\) |
risch | \(\frac {e^{2} x}{c}+\frac {\ln \left (-a^{2} e^{2}+a c \,d^{2}-\sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}\, x \right ) d e}{c}+\frac {\ln \left (-a^{2} e^{2}+a c \,d^{2}-\sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}\, x \right ) \sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}}{2 c^{2} a}+\frac {\ln \left (-a^{2} e^{2}+a c \,d^{2}+\sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}\, x \right ) d e}{c}-\frac {\ln \left (-a^{2} e^{2}+a c \,d^{2}+\sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}\, x \right ) \sqrt {-a c \left (e^{2} a -c \,d^{2}\right )^{2}}}{2 c^{2} a}\) | \(232\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.54, size = 52, normalized size = 0.88 \begin {gather*} \frac {d e \log \left (c x^{2} + a\right )}{c} + \frac {x e^{2}}{c} + \frac {{\left (c d^{2} - a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.83, size = 135, normalized size = 2.29 \begin {gather*} \left [\frac {2 \, a c d e \log \left (c x^{2} + a\right ) + 2 \, a c x e^{2} + {\left (c d^{2} - a e^{2}\right )} \sqrt {-a c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right )}{2 \, a c^{2}}, \frac {a c d e \log \left (c x^{2} + a\right ) + a c x e^{2} + {\left (c d^{2} - a e^{2}\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right )}{a c^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 185 vs.
\(2 (53) = 106\).
time = 0.24, size = 185, normalized size = 3.14 \begin {gather*} \left (\frac {d e}{c} - \frac {\sqrt {- a c^{3}} \left (a e^{2} - c d^{2}\right )}{2 a c^{3}}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {d e}{c} - \frac {\sqrt {- a c^{3}} \left (a e^{2} - c d^{2}\right )}{2 a c^{3}}\right ) + 2 a d e}{a e^{2} - c d^{2}} \right )} + \left (\frac {d e}{c} + \frac {\sqrt {- a c^{3}} \left (a e^{2} - c d^{2}\right )}{2 a c^{3}}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {d e}{c} + \frac {\sqrt {- a c^{3}} \left (a e^{2} - c d^{2}\right )}{2 a c^{3}}\right ) + 2 a d e}{a e^{2} - c d^{2}} \right )} + \frac {e^{2} x}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.85, size = 52, normalized size = 0.88 \begin {gather*} \frac {d e \log \left (c x^{2} + a\right )}{c} + \frac {x e^{2}}{c} + \frac {{\left (c d^{2} - a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 62, normalized size = 1.05 \begin {gather*} \frac {e^2\,x}{c}+\frac {d^2\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {c}}-\frac {\sqrt {a}\,e^2\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {d\,e\,\ln \left (c\,x^2+a\right )}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________